<template>
	<view>
		<view class="walletbox ">
			<!-- <view class="pricetext f600">
				资产
			</view> -->
			<view class="pricetotal f15 white">
				{{$t('ecology.zczzh')}}
			</view>
			<view class="price">
				<span class="f600 font-bin">{{total}}</span><span>USDT</span>
			</view>
			<view class="ctbox">
				<!-- <navigator class="charge bg-theme white f14" url="charge">
					<view class="">
						<view class="">
							充值
						</view>
					</view>
				</navigator> -->
				<navigator class="carry bg-theme white f14" url="extract">
					<view class="">
						{{$t('ecology.tibi')}}
					</view>
				</navigator>
				<navigator class="carry bg-theme white f14 ml10" :url="'charge?coin='+JSON.stringify(list)">
					<view class="">
						{{$t('ecology.zz')}}
					</view>
				</navigator>
			</view>
		</view>
		
		
		<view class="myassetsbox pb20">
			<navigator class="walletitem px15 py18 fsb mt10" v-for="(item,index) in list" :key="index" :url="'./cointype?coin='+item.coin">
				<view class="fcc">
					<image class="mr14" :src="item.logo" mode=""></image>
					<view class="white f18" >
						{{item.coin}}
					</view>
				</view>
				<view class="money">
					<view class="white f18 mb2" style="text-align: right;">
						{{item.money}}
					</view>
					<view class="f12 color-gray">
						≈${{item.coinToUsdt}}
					</view>
				</view>
			</navigator>
			
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				list:[],
				total:0
			}
		},
		onLoad() {
			
		},
		onShow() {
			uni.setTabBarItem({ index: 0, text: this.$t('tabber.home') })
			uni.setTabBarItem({ index: 1, text: this.$t('tabber.news') })
			uni.setTabBarItem({ index: 2, text: this.$t('tabber.assets') })
			uni.setTabBarItem({ index: 3, text: this.$t('tabber.user') })
			this.$http.post('wallet.mywallet').then(res=>{
				this.list=res.data.walletList
				this.total=res.data.toUsdt
			})
		},
		methods:{
			
		}
	}
</script>

<style lang="less">
	
	.walletbox{
		background-image: url(../../static/banner.png);
		background-size: cover;
		background-repeat: no-repeat;
		padding-left: 30rpx;
		padding-right: 30rpx;
		.pricetext{
			font-size: 48rpx;
			color: #fff;
			font-family: STSongti, STSongti-Bold;
		}
		.pricetotal{
			font-size: 30rpx;
			padding-top: 144rpx;
			height: 40rpx;
			opacity: 1;
			font-family: PingFang, PingFang-Medium;
			font-weight: 500;
			text-align: left;
			color: #ffffff;
			line-height: 40rpx;
		}
		.price{
			color: #fff;
			margin-top: 20rpx;
		}
		.price span:nth-child(1){
			font-size: 68rpx;
			margin-right: 24rpx;
		}
		.price span:nth-child(2){
			font-size: 28rpx;
		}
		.ctbox{
			display: flex;
			justify-content: flex-start;
			align-items: center;
			margin-top: 56rpx;
			padding-bottom: 44rpx;
			.charge{
				display: flex;
				justify-content: center;
				align-items: center;
				font-size: 24rpx;
				width: 94px;
				height: 33px;
				opacity: 1;
				background: #007aff;
				border-radius: 5px;
				margin-right: 32rpx;
			}
			.carry{
				display: flex;
				justify-content: center;
				align-items: center;
				font-size: 24rpx;
				width: 94px;
				height: 33px;
				opacity: 1;
				background: #007aff;
				border-radius: 5px;
			}
		}
		
	}
	.myassetsbox{
		.assetstitle{
			.bluetitle{
				width: 8rpx;
				height: 36rpx;
				opacity: 1;
				background: #1372df;
				margin-right: 12rpx;
			}
			padding:0 30rpx;
			display: flex;
			justify-content: flex-start;
			align-items: center;
			width: 690rpx;
			height: 80rpx;
			opacity: 1;
			color: #202021;
			font-size: 28rpx;
			// border-bottom: 2rpx dashed #ccc;
		}
		.walletitem{
			background-color: #121D2C;
			image{
				width: 70rpx;
				height: 70rpx;
			}
			.moneybox{
				display: flex;
				justify-content: space-between;
				align-items: center;
				width: 610rpx;
				padding-right: 30rpx;
				padding-bottom: 20rpx;
			}
		}
	}
</style>
